/**
 * Created on Apr 22, 2007
 */
package jvs.vfs;

import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;

/**
 * @author qiangli
 * 
 */
public interface IFile {

	public boolean canRead();
	
	public boolean canWrite();
	
	public boolean copy(URI uri);

	public boolean create();

	public boolean delete();

	public boolean exists();
	
	public Object getAttribute(String name);
	
	public String getContent();

	public String getContentEncoding();

	public String getContentType();
	
	public String getDisplayName();
	
	public InputStream getInputStream();

	public long getLastModified();
	
	public long getLength();
	
	public OutputStream getOutputStream();

	public boolean isDirectory();

	public boolean isFile();
	
	/**
	 * A link is a directory but has content pointing to an URI
	 * 
	 */
	public boolean isLink();
	
	public boolean link(URI uri);
	
	public String[] list();
	
	public boolean mkdir();
	
	public boolean move(URI uri);

	public boolean setAttribute(String name, Object value);
	
	public boolean setContent(String s);
	
	public boolean setContentEncoding(String encoding);
	
	public boolean setContentType(String mimeType);

	public boolean setInputStream(InputStream in);

	public boolean setLastModified(long time);
	
	public boolean setLength(long len);


	public boolean setOutputStream(OutputStream out);

	public void deleteOnExit();

}
